<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // 数组中的值和长度都可以随时被改变

        var arr = [1,2,3] ;

        // 改变数组的长度   --  重新给length赋值
        arr.length = 5 ;

        console.log(arr);

        arr[3] = 100 ;
        arr[4] = 90 ;
        arr[0] = 11 ;

        console.log(arr);




        

    </script>
    
</body>
</html>